package org.opens.lambda.stream.my_stream;

import java.util.Random;
import java.util.function.Supplier;

public class ObjSupplier implements Supplier<Obj> {

    private int index = 0;

    private Random random = new Random(System.currentTimeMillis());

    @Override
    public Obj get() {
        index = random.nextInt(100);
        return new Obj(index, "name->" + index);
    }

}
